package com.leather.user.controller;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class AuthController {

    public static void main(String[] args) {

        int count = 0;
        for (int a = 0; a < 10; a++) {
            for (int b = 0; b < 10; b++) {
                for (int c = 0; c < 10; c++) {
                    for (int d = 0; d < 10; d++) {
                        for (int e = 0; e < 10; e++) {
                            if((a==b&&c==d)||(a==b&&d==e)||(b==c&&d==e)) {
                                count++;
                                System.out.println(""+a+b+c+d+e);
                            }
                        }
                    }
                }
            }
        }
        System.out.println(count);
    }

    public static boolean judgeChongfu(String str) {
        HashMap<Character, Integer> maps = new HashMap<>();
        for (Character c : str.toCharArray()) {
            maps.put(c, 0);
        }
        return maps.size() <= 2;
    }

    public static boolean judgeDuizi(String str) {
        HashMap<Character, Integer> maps = new HashMap<>();
        for (Character c : str.toCharArray()) {
            maps.put(c, 0);
        }
        return maps.size() == 4;
    }

    public static boolean judgeSDuizi(String str) {
        HashMap<Character, Integer> maps = new HashMap<>();
        for (Character c : str.toCharArray()) {
            maps.put(c, 0);
        }
        return maps.size() == 3;
    }

}
